//
//  FriendsDetailModel.m
//  Shengzhuli
//
//  Created by subook on 16/9/13.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "FriendsDetailModel.h"

@implementation FriendsDetailModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.age = [dict[@"age"] integerValue];
        self.gender = [dict[@"gender"] integerValue];
        self.nickName = dict[@"nickName"];
        self.portraitUrl = dict[@"portraitUrl"];
        self.ID = [dict[@"id"] integerValue];
        self.registerAge = [dict[@"registerAge"] integerValue];
        self.personalizedSignature = dict[@"personalizedSignature"];
        self.detailedAddress = dict[@"detailedAddress"];
        self.position = dict[@"position"];
        self.name = dict[@"name"];
        NSMutableArray *futures = [NSMutableArray array];
        for (NSDictionary *futureDict in dict[@"futures"]) {
            MyFutureModel *model = [MyFutureModel objectWithDict:futureDict];
            [futures addObject:model];
        }
        self.futures = futures;
        self.isFriend = [dict[@"isFriend"] integerValue];
        
        self.distance = dict[@"distance"];
        self.mobilePhone = dict[@"mobilePhone"];
        
        self.content = dict[@"content"];
        self.formatCreateDate = dict[@"formatCreateDate"];
        self.referrerPhone = dict[@"referrerPhone"];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[FriendsDetailModel alloc]initWithDict:dict];
}

@end
